{template 'common/header'}
<ul class="nav nav-tabs">
    <li class="active"><a href="{php echo url('home/welcome/' . $do);}">账号概况 - {$title}</a></li>
</ul>
<div class="clearfix welcome-container">
    <div class="shortcut clearfix">
        {loop $shortcuts $shortcut}
        <a href="{$shortcut['link']}" title="{$shortcut['title']}">
            <img src="{$shortcut['image']}" alt="{$shortcut['title']}" class="img-rounded" />
            <span>{$shortcut['title']}</span>
        </a>
        {/loop}

        <div class="page-header">
            <h4><i class="fa fa-cubes"></i> 已开通的模块</h4>
        </div>
        <div class="panel panel-default row">
            <div class="table-responsive panel-body">
                <table class="table">
                    <tr>
                        <th style="width:10%">图标</th>
                        <th style="width:15%">模块名称</th>
                        <th>描述</th>
                        <th>状态</th>
                        <th></th>
                    </tr>
                    {loop $mymodules $row}
                    <tr>
                        <td>
                            <img alt="{$row['title']}" src="{$row['icon']}" width="48" height="48" class="img-rounded">
                        </td>
                        <td>
                            {$row['title']}
                        </td>
                        <td>
                            {$row['ability']}
                        </td>
                        <td>
                            {if $row['deadline']<strtotime(date('Y-m-d'))&&$row['deadline']!=-1}
                            <button class="btn btn-info" onmouseover="this.innerText='&nbsp;续&nbsp;费&nbsp;'" onmouseleave="this.innerText='已过期'">已过期</button>
                            {else}
                            <button class="btn btn-success">已开通</button>
                            {/if}
                        </td>
                    </tr>
                    {/loop}
                </table>
            </div>
        </div>

        <div class="page-header">
            <h4><i class="fa fa-cubes"></i> 未开通的模块</h4>
        </div>
        <div class="panel panel-default row">
            <div class="table-responsive panel-body">
                <table class="table">
                    <tr>
                        <th style="width:10%">图标</th>
                        <th style="width:15%">模块名称</th>
                        <th>描述</th>
                        <th>操作</th>
                    </tr>
                    {loop $moudles $row}
                    <tr>
                        <td>
                            <img alt="{$row['title']}" src="{$row['icon']}" width="48" height="48" class="img-rounded">
                        </td>
                        <td>
                            {$row['title']}
                        </td>
                        <td>
                            {$row['ability']}
                        </td>
                        <td>
                            <button class="btn btn-success" onclick='window.location.href = "{php echo url('module/detail',array('mid'=>$row['mid']))}"'>开通</button>
                        </td>
                    </tr>
                    {/loop}
                </table>
            </div>
        </div>
    </div>
</div>
{template 'common/footer'}